<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>

<html lang="zh-CN">


<head>

<meta charset="utf-8">
<!--声明文档兼容模式，表示使用IE浏览器的最新模式-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--设置视口的宽度(值为设备的理想宽度)，页面初始缩放值<理想宽度/可见宽度>-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
<title>article</title>

<!-- 引入Bootstrap核心样式文件 -->
<link href="../css/bootstrap.css" rel="stylesheet">
<!-- 引入日历样式文件 -->
<link rel="stylesheet" href="../css/calendar.css">
<!-- 引入jQuery核心js文件 -->
<script src="../js/jquery-1.11.3.min.js"></script>
<!-- 引入BootStrap核心js文件 -->
<script src="../js/bootstrap.min.js"></script>

<script src="../js/calendar.js"></script>

<link rel="stylesheet" type="text/css" href="../css/simditor.css" />
<script type="text/javascript" src="../js/module.min.js"></script>
<script type="text/javascript" src="../js/hotkeys.min.js"></script>
<script type="text/javascript" src="../js/uploader.min.js"></script>
<script type="text/javascript" src="../js/simditor.min.js"></script>


<link rel="stylesheet" type="text/css" href="../css/front/artilce.css" />

<script type="text/javascript" src="../js/front/article.js"></script>

</head>

<body>

	<!--导航栏-->
	<div class="head">
		<div class="container ">

			<div class="row">
				<a href="main?userId=${user.userId }" class="user">${user.name }</a>
				<ul>
					<a href="blog">
						<li>博客园</li>
					</a>
					<a href="main?userId=${user.userId }">
						<li>首页</li>
					</a>
				</ul>
			</div>
		</div>
	</div>

	<!--文章-->
	<div class="article">
		<div class="container">
			<div class="row">
				<!--右侧-->
				<div class="col-lg-3 col-md-3 col-ms-3">
					<div class="row notice">
						<div class="row notice-title">
							<span>公告</span>
						</div>

						<div class="row notice-info">
							<span>昵称：</span><a href="main?userId=${user.userId }">${user.name }</a><br />
							<span>性别：</span><a href="main?userId=${user.userId }">${user.sex==0?"男":"女" }</a><br />
							<span>园龄：</span><a href="main?userId=${user.userId }">${days }</a><br />
						</div>
					</div>

					<div class="row">
						<div id="calendar" class="calendar"></div>

					</div>
				</div>
				<!--左侧-->
				<div class="col-lg-9 col-md-9 col-ms-9">
					<!--文章内容-->
					<div class="row text">
						<div class="row title">
							<span>${article.artTitle }</span>
						</div>
						<div class="row context">
							<span style="font-size: 14px;">${article.artContext } </span>
						</div>
					</div>
					<div id="dingwei"></div>
					<!--已登录才能评论没登录则登录-->
					<div class="row comment" id="comment">
						注册用户登录后才能发表评论，请 <a href="${loginUrl }" id="login">${login }</a> <a
							href="${regUrl }">${reg }</a> <a href="blog">访问</a>网站首页。
					</div>


					

					<!--发表评论-->
					<div class="row com " id="subCom">
						<form action="article?articleId=${articleId }&comPeo=${uname}"
							method="post">
							<div class="row list">
								<h4>发表评论</h4>
							</div>
							<div class="row">
								<div class="row comPeople">
									<span>昵称：</span> <span id="user"><a
										href="main?userId=${userId } ">${uname }</a></span>


								</div>
								<div class="row ">
									<textarea id="editor" name="comText" placeholder="请输入评论内容" autofocus></textarea>
									<script>
										var editor = new Simditor({
											textarea : $('#editor')
										//optional options
										});
									</script>
								</div>
								<div class="row comtext">
									<input type="submit" id="" name="" value="提交评论" />
								</div>
							</div>
						</form>
					</div>


					<div class="row com" id="comList">
						<div class="row list">
							<h4>评论列表</h4>
						</div>

						<c:forEach items="${com }" var="comment" varStatus="stauts">


							<div class="row">
								<div class="row comPeople">

									<span>#<span>${stauts.count }</span>楼
									</span> <span>${comment.comTime }</span> <span id="comUser"><a
										href="main?userId=${comment.comPeopleId }">${comment.comPeopleName }</a></span>

								</div>
								<div class="row comtext">
									<span>${comment.comContext }</span>
								</div>
							</div>
						</c:forEach>

					</div>



				</div>

			</div>
			<div class="row copyright">Copyright ©2018 NickQ</div>
		</div>
	</div>
</body>

</html>